package com.bsj.power.pls.service;

import com.bsj.power.common.config.global.JsonResult;
import com.bsj.power.common.def.dto.DeleteDTO;
import com.bsj.power.common.def.dto.personnel.PersonnelDTO;
import com.bsj.power.common.def.dto.personnel.PersonnelSearchDTO;
import com.bsj.power.common.def.dto.personnel.WorkPersonnelSearchDTO;
import com.bsj.power.common.def.entity.job.WorkPersonnel;
import com.bsj.power.common.def.entity.personnel.Personnel;
import com.bsj.power.common.def.vo.KeyValueVO;
import com.bsj.power.common.def.vo.pls.PersonnelVO;
import com.bsj.power.common.def.vo.pls.WorkPersonnelVO;

import java.util.List;
import java.util.Map;

/**
 * @author LiJiaXin
 * @version 1.0.0
 * @description locationDeviceService
 * @time 2024/4/18 17:08
 */
public interface PersonnelService {

    /**
     * 添加人员信息
     *
     * @param personnelDTO
     * @return com.bsj.power.common.config.global.JsonResult
     * @author ljx
     * @time 2024/4/18 17:12
     */
    JsonResult addPersonnel(PersonnelDTO personnelDTO);

    /**
     * 删除人员
     *
     * @param deleteDTO
     * @return com.bsj.power.common.config.global.JsonResult
     * @author ljx
     * @time 2024/4/18 20:01
     */
    JsonResult deletePersonnel(DeleteDTO deleteDTO);

    /**
     * 修改人员信息
     *
     * @param personnelDTO
     * @return com.bsj.power.common.config.global.JsonResult
     * @author ljx
     * @time 2024/4/18 17:37
     */
    JsonResult updatePersonnel(PersonnelDTO personnelDTO);

    /**
     * 获取单个人员信息
     *
     * @param personnelId
     * @return com.bsj.power.common.def.vo.pls.PersonnelVO
     * @author ljx
     * @time 2024/4/18 20:01
     */
    PersonnelVO getPersonnelById(Integer personnelId);

    /**
     * 人员分页
     *
     * @param personnelSearchDTO
     * @return com.bsj.power.common.config.global.JsonResult<java.util.List < com.bsj.power.common.def.vo.pls.PersonnelVO>>
     * @author ljx
     * @time 2024/4/18 20:02
     */
    JsonResult<List<PersonnelVO>> pagePersonnel(PersonnelSearchDTO personnelSearchDTO);

    /**
     * 分页查询作业人员信息
     *
     * @param dto
     * @return
     */
    JsonResult<List<WorkPersonnelVO>> pageWorkPersonnel(WorkPersonnelSearchDTO dto);

    /**
     * 模糊搜索
     *
     * @param value
     * @param isBind
     * @return java.util.List<com.bsj.power.common.def.vo.KeyValueVO>
     * @author ljx
     * @time 2024/5/10 14:10
     */
    List<KeyValueVO> fuzzySearch(String value, Boolean isBind);

//    /**
//     * 人员信息同步
//     *
//     * @return com.bsj.power.common.config.global.JsonResult
//     * @author ljx
//     * @time 2024/7/10 10:20
//     */
//    JsonResult personnelInfoSync();

    /**
     * 根据id获取作业人员信息
     *
     * @param id
     * @return com.bsj.power.common.def.vo.pls.WorkPersonnelVO
     * @author ljx
     * @time 2024/9/12 14:36
     */
    WorkPersonnelVO getWorkPersonnelById(Integer id);

    /**
     * 是否关注
     *
     * @param personType  人员类型 1负责人 2作业人员
     * @param personId    人员id
     * @param isAttention 1关注 2取消关注
     * @return com.bsj.power.common.config.global.JsonResult
     * @author ljx
     * @time 2024/9/25 19:39
     */
    JsonResult isAttention(Integer personType, Integer personId, Integer isAttention);

    /**
     * 负责人员关注人员列表
     *
     * @return java.util.List<com.bsj.power.common.def.entity.personnel.Personnel>
     * @author ljx
     * @time 2024/9/25 20:14
     */
    List<Personnel> attentionPersonnelList();

    /**
     * 作业人员关注人员列表
     *
     * @return java.util.List<com.bsj.power.common.def.entity.job.WorkPersonnel>
     * @author ljx
     * @time 2024/9/25 20:15
     */
    List<WorkPersonnel> attentionWorkPersonnelList();

    /**
     * 删除作业人员信息
     *
     * @param deleteDTO
     * @return com.bsj.power.common.config.global.JsonResult
     * @author ljx
     * @time 2024/11/19 16:23
     */
    JsonResult deleteWorkPersonnel(DeleteDTO deleteDTO);

    Map<String,String> getPersonNoInfo();

    Map<String,String> cleanPersonNoInfo();
}
